package cn.shenxd.api.service;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import cn.shenxd.api.entiy.User;

@RequestMapping("/refactor")
public interface HelloService {
	
	@GetMapping("/hello4")
	public String hello(@RequestParam("name") String name); //需指定@RequestParam，@RequestHeader参数名称
	
	@GetMapping("/hello5")
	public User hello(@RequestHeader("name") String name,@RequestHeader("age") Integer age);
	
	@PostMapping("/hello6")
	public String hello(@RequestBody User user);

}
